home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / dayquote / printdoc.bas < prev    next >
Encoding:
BASIC Source File  |  1995-05-09  |  38.4 KB  |  908 lines

  1.     DECLARE SUB PrintDoc (FileName$)
  2.  
  3. Sub PrintDoc (FileName$)
  4.  
  5.     Open FileName$ For Output As #1
  6.  
  7.     Print #1,
  8.     Print #1,
  9.     Print #1,
  10.     Print #1,
  11.     Print #1,
  12.     Print #1,
  13.     Print #1,
  14.     Print #1, "                       ───────────  DayQuote  ───────────"
  15.     Print #1,
  16.     Print #1, "                       (c) 1994, 1995  Freeware Unlimited"
  17.     Print #1,
  18.     Print #1, "                       ──────────────────────────────────"
  19.     Print #1,
  20.     Print #1,
  21.     Print #1,
  22.  
  23. If FileName$ <> "CON" Then Print "Printing documentation to file:  "; FileName$
  24. If FileName$ <> "CON" Then Print ".";
  25.  
  26.     Print #1,
  27.     Print #1,
  28.     Print #1,
  29.     Print #1,
  30.     Print #1, "                                    Contents"
  31.     Print #1, "                   ──────────────────────────────────────────"
  32.     Print #1,
  33.     Print #1, "                   ■ Introduction . . . . . . . . . . . . . 2"
  34.     Print #1,
  35.     Print #1, "                   ■ Quote File Structure . . . . . . . . . 3"
  36.     Print #1,
  37.     Print #1, "                   ■ Command Line Options . . . . . . . . . 5"
  38.     Print #1,
  39.     Print #1, "                   ■ Result Messages  . . . . . . . . . . . 8"
  40.     Print #1,
  41.  
  42. If FileName$ <> "CON" Then Print ".";
  43.  
  44.     Print #1, "                   ──────────────────────────────────────────"
  45.     Print #1,
  46.     Print #1,
  47.     Print #1,
  48.     Print #1,
  49.     Print #1,
  50.     Print #1,
  51.     Print #1,
  52.     Print #1,
  53.     Print #1,
  54.     Print #1,
  55.     Print #1,
  56.     Print #1, "               ╔═════════════════════════════════════════════════╗"
  57.     Print #1, "               ║                He's dead, Jim.                  ║"
  58.     Print #1, "               ║                                         - Bones ║"
  59.  
  60. If FileName$ <> "CON" Then Print ".";
  61.  
  62.     Print #1, "               ╚═════════════════════════════════════════════════╝"
  63.     Print #1,
  64.     Print #1,
  65.     Print #1,
  66.     Print #1,
  67.     Print #1,
  68.     Print #1,
  69.     Print #1,
  70.     Print #1,
  71.     Print #1,
  72.     Print #1,
  73.     Print #1,
  74.     Print #1,
  75.     Print #1,
  76.     Print #1,
  77.  
  78. If FileName$ <> "CON" Then Print ".";
  79.  
  80.     Print #1,
  81.     If FileName$ <> "CON" Then Print #1, "                                     Page 1 "
  82.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  83.     Print #1, "  ■ INTRODUCTION"
  84.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  85.     Print #1,
  86.     Print #1,
  87.     Print #1, "    ■ What DayQuote Is:"
  88.     Print #1,
  89.     Print #1, "        It is, to be perfectly honest, the first real program I have"
  90.     Print #1, "        written, and there might exist on some plane programmers who are"
  91.     Print #1, "        self-important enough to say that even this isn't a real program."
  92.     Print #1,
  93.     Print #1, "        Nevertheless, I think you will enjoy it, and its many options."
  94.     Print #1, "        Those hypothetical programmers I mentioned earlier might even"
  95.  
  96. If FileName$ <> "CON" Then Print ".";
  97.  
  98.     Print #1, "        take a second glance at its versatile command line options."
  99.     Print #1,
  100.     Print #1, "        All of those options are described below, in their totality."
  101.     Print #1, "        The text is concise; hence, it might be 'thick' in some places."
  102.     Print #1, "        Please, though, if you feel justified in your critique of my"
  103.     Print #1, "        writing - either in the English language or the BASIC language -"
  104.     Print #1, "        then I would welcome your comments by snail mail."
  105.     Print #1,
  106.     Print #1,
  107.     Print #1, "    ■ How It Works:"
  108.     Print #1,
  109.     Print #1, "        It takes what you have typed in following its name on the command"
  110.     Print #1, "        line and then acts on the information you have given to it."
  111.     Print #1, "        Several things can take place from there, depending upon what"
  112.     Print #1, "        you gave to it in the form of 'switches' on the command line."
  113.  
  114. If FileName$ <> "CON" Then Print ".";
  115.  
  116.     Print #1,
  117.     Print #1, "        If it encounters '/?' anywhere, it will show the Help Screen,"
  118.     Print #1, "        then return you to the command line.  If it encounters the '/D'"
  119.     Print #1, "        switch, it will go into an exclusive process similar to the '/?'"
  120.     Print #1, "        switch, except that it is more comprehensive in every respect."
  121.     Print #1, "        See the section about Command Line Options for complete details"
  122.     Print #1, "        on these options, as well as the following ones."
  123.     Print #1,
  124.     Print #1, "        Aside from those switches, there are nine other switches that"
  125.     Print #1, "        you can use to fully customize the look of your quotes.  Two of"
  126.     Print #1, "        those will control the color of the text frame displayed, and two "
  127.     Print #1, "        others will determine how wide the frame will be.  One of them"
  128.     Print #1, "        also allows you to place the frame starting at any line on your"
  129.     Print #1, "        screen, and there is another switch that will clear the screen"
  130.     Print #1, "        before doing so.  Finally, there are three switches to choose"
  131.  
  132. If FileName$ <> "CON" Then Print ".";
  133.  
  134.     Print #1, "        from that will control how the text of the quote is justified"
  135.     Print #1, "        within the frame; left- or right- or centered."
  136.     Print #1,
  137.     Print #1,
  138.     Print #1, "    ■ To Get More Information:"
  139.     Print #1,
  140.     Print #1, "        Type 'DAYQUOTE/$' on the command line and read about how you can"
  141.     Print #1, "        get free money sent to you, and a whole bunch of other free stuff."
  142.     Print #1,
  143.     Print #1,
  144.     Print #1,
  145.     Print #1,
  146.     Print #1,
  147.     Print #1,
  148.     Print #1,
  149.  
  150. If FileName$ <> "CON" Then Print ".";
  151.  
  152.     Print #1,
  153.     Print #1,
  154.     Print #1,
  155.     If FileName$ <> "CON" Then Print #1, "                                     Page 2 "
  156.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  157.     Print #1, "  ■ QUOTE FILE STRUCTURE"
  158.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  159.     Print #1,
  160.     Print #1, "    ■ Quote file basics:"
  161.     Print #1,
  162.     Print #1, "        What follows between the funky lines is a representative sample"
  163.     Print #1, "        of a valid quote file."
  164.     Print #1,
  165.     Print #1, "        /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\"
  166.     Print #1, "        | Four score and seven years ago...                            |"
  167.  
  168. If FileName$ <> "CON" Then Print ".";
  169.  
  170.     Print #1, "        | ~~Abraham Lincoln                                            |"
  171.     Print #1, "        |                                                              |"
  172.     Print #1, "        | He's dead, Jim.                                              |"
  173.     Print #1, "        | ~~Bones                                                      |"
  174.     Print #1, "        |                                                              |"
  175.     Print #1, "        \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/"
  176.     Print #1,
  177.     Print #1, "        The basic philosophy behind it is to try grouping each body of"
  178.     Print #1, "        text as close as possible.  Each distinct quote must be separated"
  179.     Print #1, "        by a minimum of two carriage returns (Enters), including the one"
  180.     Print #1, "        at the end of the previous quote's line.  The picture again:"
  181.     Print #1, "               "
  182.     Print #1, "        /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\"
  183.     Print #1, "        | Four score and seven years ago...                            |"
  184.     Print #1, "        | ~~Abraham Lincoln «»  <──────────── carriage return 1        |"
  185.  
  186. If FileName$ <> "CON" Then Print ".";
  187.  
  188.     Print #1, "        | «»  <────────────────────────────── carriage return 2        |"
  189.     Print #1, "        | He's dead, Jim.                                              |"
  190.     Print #1, "        | ~~Bones                                                      |"
  191.     Print #1, "        |                                                              |"
  192.     Print #1, "        \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/"
  193.     Print #1,
  194.     Print #1, "        If you slip up, though, and have, say, 42 carriage returns in there"
  195.     Print #1, "        by pure accident, don't sweat it.  The program is fairly lax in"
  196.     Print #1, "        searching for quotes, aside from the one hard rule listed above."
  197.     Print #1,
  198.     Print #1, "        It will ignore multiple spaces, as well as single carriage returns."
  199.     Print #1, "        The text which is separated by at least two carriage returns is"
  200.     Print #1, "        considered the body of one quote, and will become one string of"
  201.     Print #1, "        text, each word separated by one space, that will be displayed"
  202.     Print #1, "        in accordance with any specified parameters, no matter how many"
  203.  
  204. If FileName$ <> "CON" Then Print ".";
  205.  
  206.     Print #1, "        spaces are embedded within the quote.  You could have 113 spaces"
  207.     Print #1, "        between just two words, and the quote will display as two words"
  208.     Print #1, "        separated by a single space.  The rationale for this flexibility"
  209.     Print #1, "        is that sometimes we don't realize there are a whole bunch of"
  210.     Print #1, "        extra spaces at the end of a line, because we can't really SEE"
  211.     Print #1, "        them, so it just makes the program more forgiving of our own"
  212.     Print #1, "        imperfections."
  213.     Print #1,
  214.     Print #1,
  215.     Print #1,
  216.     Print #1,
  217.     Print #1,
  218.     Print #1,
  219.     Print #1,
  220.     Print #1,
  221.  
  222. If FileName$ <> "CON" Then Print ".";
  223.  
  224.     Print #1,
  225.     Print #1,
  226.     Print #1,
  227.     Print #1,
  228.     Print #1,
  229.     If FileName$ <> "CON" Then Print #1, "                                     Page 3 "
  230.     Print #1, "    ■ Creating your own quote file:"
  231.     Print #1,
  232.     Print #1, "        The best way to make a quote file is to use a 'text editor' or"
  233.     Print #1, "        a 'word processor'.  If you use a word processor, make sure when"
  234.     Print #1, "        you save the file that you are saving it in 'pure ASCII', which"
  235.     Print #1, "        will mean unformatted text only, otherwise, you are apt to have"
  236.     Print #1, "        some very strange-looking quotes appearing on your screen, since"
  237.     Print #1, "        the word processor formatting codes that get added to the text"
  238.     Print #1, "        will probably not comply very much with the two-return rule."
  239.  
  240. If FileName$ <> "CON" Then Print ".";
  241.  
  242.     Print #1,
  243.     Print #1, "        It is best to just type the text in as you want it to read.  Again,"
  244.     Print #1, "        how the text looks in the file will be irrelevant to how it is"
  245.     Print #1, "        displayed.  All display aspects are controlled by the optional"
  246.     Print #1, "        command line switches, and all of those switches have defaults,"
  247.     Print #1, "        so you need not worry about the display aspects until later on,"
  248.     Print #1, "        when you are more familiar with the program's operation."
  249.     Print #1,
  250.     Print #1, "        One worthy note here is that all quotes will be displayed in a"
  251.     Print #1, "        bordered rectangle, therefore it is not necessary to include"
  252.     Print #1, "        quotation characters in your quote file, unless you prefer the"
  253.     Print #1, "        look of them.  (Future releases will allow custom frame borders.)"
  254.     Print #1,
  255.     Print #1, "        This documentation file was created originally by me using the"
  256.     Print #1, "        MS-DOS Editor, an easy-to use, standard ASCII text editor, and"
  257.  
  258. If FileName$ <> "CON" Then Print ".";
  259.  
  260.     Print #1, "        it looked exactly as you see it now.  If you wanted to, you could"
  261.     Print #1, "        try using this documentation file as your test quote file.  Each"
  262.     Print #1, "        paragraph, since they are all separated by two carriage returns,"
  263.     Print #1, "        would be considered a single quote.  If you do this, though, be"
  264.     Print #1, "        advised that you might get the 'Attempt to read a binary file...'"
  265.     Print #1, "        message, due to the form-feed characters embedded in the text."
  266.     Print #1, "        See the Result Messages section for more details on errors."
  267.     Print #1,
  268.     Print #1,
  269.     Print #1, "    ■ 'Attributed' quotes:"
  270.     Print #1,
  271.     Print #1, "        Back to the drawing board:"
  272.     Print #1,
  273.     Print #1, "                               /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\"
  274.     Print #1, "         Quote ──────────────> | Four score and seven years ago...  |"
  275.  
  276. If FileName$ <> "CON" Then Print ".";
  277.  
  278.     Print #1, "        'Attribution' ───────> | ~~Abraham Lincoln                  |"
  279.     Print #1, "                               |                                    |"
  280.     Print #1, "                               \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/"
  281.     Print #1,
  282.     Print #1, "        As you can see, an attribution is the name of the person to whom"
  283.     Print #1, "        the quote is attributed.  When DayQuote encounters the attribution"
  284.     Print #1, "        code, '~~', it stops reading the quote, and makes whatever"
  285.     Print #1, "        follows into the attribution.  Upon display, the attribution will"
  286.     Print #1, "        appear to the right side of the quote frame, preceded by a dash"
  287.     Print #1, "        and a single space, like this:"
  288.     Print #1,
  289.     Print #1, "             ╔═══════════════════════════════════════════════════╗"
  290.     Print #1, "             ║ Four score and seven years ago...                 ║"
  291.     Print #1, "             ║                                 - Abraham Lincoln ║"
  292.     Print #1, "             ╚═══════════════════════════════════════════════════╝"
  293.  
  294. If FileName$ <> "CON" Then Print ".";
  295.  
  296.     Print #1,
  297.     Print #1, "        If what follows the attribution code is too long to fit in the"
  298.     Print #1, "        frame, then the remaining text will be truncated.  This shouldn't"
  299.     Print #1, "        be a problem, though, if the attribution is just a name."
  300.     Print #1,
  301.     Print #1,
  302.     Print #1,
  303.     If FileName$ <> "CON" Then Print #1, "                                     Page 4 "
  304.     Print #1, "─────────────────────────────────────────────────────────────────────────────"
  305.     Print #1, "  ■ COMMAND LINE OPTIONS"
  306.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  307.     Print #1,
  308.     Print #1, "       ┌──────────────────────────────────────────────────────────────┐"
  309.     Print #1, "       │ DayQuote 1.0  ─  Copyright 1994, 1995 by Freeware Unlimited. │"
  310.     Print #1, "       ├──────────────────────────────────────────────────────────────┤"
  311.  
  312. If FileName$ <> "CON" Then Print ".";
  313.  
  314.     Print #1, "       │ Usage: DAYQUOTE [switches] quotefil.ext                      │"
  315.     Print #1, "       │                                                              │"
  316.     Print #1, "       │  Switches:                                                   │"
  317.     Print #1, "       │   /?     - Shows this help screen.                           │"
  318.     Print #1, "       │   /F:c   - Use foreground color 'c', as listed below.        │"
  319.     Print #1, "       │   /B:c   - Use background color 'c', as listed below.        │"
  320.     Print #1, "       │   /L     - Left-justify the text.                            │"
  321.     Print #1, "       │   /R     - Right-justify the text.                           │"
  322.     Print #1, "       │   /C     - Center the text.                                  │"
  323.     Print #1, "       │   /S:#   - Start at specified column # (1-30). Default = 10  │"
  324.     Print #1, "       │   /E:#   - End at specified column # (50-80).  Default = 70  │"
  325.     Print #1, "       │   /T:#   - Top line # to begin on (1-24). Default = current  │"
  326.     Print #1, "       │   /W     - Wipe (clear) the screen before displaying.        │"
  327.     Print #1, "       │   /D[:n] - Create documentation file, DAYQUOTE.DOC, or 'n'.  │"
  328.     Print #1, "       │   /$     - Get money sent to you.                            │"
  329.  
  330. If FileName$ <> "CON" Then Print ".";
  331.  
  332.     Print #1, "       │                                                              │"
  333.     Print #1, "       │    Available foreground colors and background colors are:    │"
  334.     Print #1, "       │                                                              │"
  335.     Print #1, "       │  BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, WHITE, GRAY  │"
  336.     Print #1, "       │  LTBLUE, LTGREEN, LTCYAN, LTRED, LTMAGENTA, YELLOW, BRWHITE  │"
  337.     Print #1, "       └──────────────────────────────────────────────────────────────┘"
  338.     Print #1,
  339.     Print #1,
  340.     Print #1,
  341.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  342.     Print #1, "  ■ EXTENDED OPTION DESCRIPTIONS"
  343.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  344.     Print #1,
  345.     Print #1, "    ■ Color switches:"
  346.     Print #1, "        "
  347.  
  348. If FileName$ <> "CON" Then Print ".";
  349.  
  350.     Print #1, "      /F:color  - Sets foreground color.  Default color is white."
  351.     Print #1, "      /B:color  - Sets background color.  Default color is black."
  352.     Print #1, "      "
  353.     Print #1, "        Use these switches to specify foreground and background colors"
  354.     Print #1, "        to use when displaying a quote.  'Color' represents one of the"
  355.     Print #1, "        following colors or abbreviations:"
  356.     Print #1,
  357.     Print #1, "            ┌───────────────────────────────────────────────────┐"
  358.     Print #1, "            │     color  =  abbr.             color   =  abbr.  │"
  359.     Print #1, "            ├───────────────────────────────────────────────────┤"
  360.     Print #1, "            │     BLACK  =  BLK         GRAY or GREY  =  GRY    │"
  361.     Print #1, "            │      BLUE  =  BLU               LTBLUE  =  LBL    │"
  362.     Print #1, "            │     GREEN  =  GRN              LTGREEN  =  LGR    │"
  363.     Print #1, "            │      CYAN  =  CYA               LTCYAN  =  LCY    │"
  364.     Print #1, "            │       RED  =  RED                LTRED  =  LRD    │"
  365.  
  366. If FileName$ <> "CON" Then Print ".";
  367.  
  368.     Print #1, "            │   MAGENTA  =  MAG            LTMAGENTA  =  LMG    │"
  369.     Print #1, "            │     BROWN  =  BRN               YELLOW  =  YEL    │"
  370.     Print #1, "            │     WHITE  =  WHT              BRWHITE  =  BRW    │"
  371.     Print #1, "            └───────────────────────────────────────────────────┘"
  372.     Print #1,
  373.     Print #1,
  374.     Print #1,
  375.     Print #1,
  376.     Print #1,
  377.     If FileName$ <> "CON" Then Print #1, "                                     Page 5 "
  378.     Print #1, "    ■ Text justification switches:"
  379.     Print #1,
  380.     Print #1, "      /L  - Sets displayed text as left-justified.  This is the default."
  381.     Print #1, "      /R  - Sets displayed text as right-justified"
  382.     Print #1, "      /C  - Sets displayed text as centered."
  383.  
  384. If FileName$ <> "CON" Then Print ".";
  385.  
  386.     Print #1,
  387.     Print #1, "        Use one of these switches to have the quote text display in a way"
  388.     Print #1, "        that you prefer.  One note on this switch: an 'attributed' quote"
  389.     Print #1, "        (see the section about Quote File Structure) will always have"
  390.     Print #1, "        it's attribution displayed on the last line, right-justified."
  391.     Print #1, "        The text body of the quote, however, will display as you set it."
  392.     Print #1,
  393.     Print #1,
  394.     Print #1, "    ■ Starting column switch:"
  395.     Print #1,
  396.     Print #1, "      /S:#  - Sets the starting column as the number specified."
  397.     Print #1,
  398.     Print #1, "        Use this switch, along with the /E switch, to customize the"
  399.     Print #1, "        displayed quote to suit your tastes.  Valid values for this"
  400.     Print #1, "        switch range from 1 to 30, inclusive."
  401.  
  402. If FileName$ <> "CON" Then Print ".";
  403.  
  404.     Print #1,
  405.     Print #1, "        The default starting column is column 10."
  406.     Print #1,
  407.     Print #1,
  408.     Print #1, "    ■ Ending column switch:"
  409.     Print #1,
  410.     Print #1, "      /E:#  - Sets the ending column as the number specified."
  411.     Print #1,
  412.     Print #1, "        Use this switch, along with the /S switch, to customize the"
  413.     Print #1, "        displayed quote to suit your tastes.  Valid values for this"
  414.     Print #1, "        switch range from 50 to 80, inclusive."
  415.     Print #1,
  416.     Print #1, "        The default ending column is column 70."
  417.     Print #1,
  418.     Print #1,
  419.  
  420. If FileName$ <> "CON" Then Print ".";
  421.  
  422.     Print #1, "    ■ Top line switch:"
  423.     Print #1,
  424.     Print #1, "      /T:#  - Sets the top line as the line number specified."
  425.     Print #1,
  426.     Print #1, "        Use this switch to further customize the look of the displayed"
  427.     Print #1, "        quote to suit your tastes.  Valid values for this switch range"
  428.     Print #1, "        from 1 to 24, inclusive."
  429.     Print #1,
  430.     Print #1, "        The default top line is the line number before execution, plus 2."
  431.     Print #1,
  432.     Print #1,
  433.     Print #1, "    ■ Clear screen switch:"
  434.     Print #1,
  435.     Print #1, "      /W  - Wipes (clears) the screen before displaying a quote."
  436.     Print #1,
  437.  
  438. If FileName$ <> "CON" Then Print ".";
  439.  
  440.     Print #1, "        Use this switch, along with the /T switch, to further enhance"
  441.     Print #1, "        the visual quality of the displayed quote."
  442.     Print #1,
  443.     Print #1,
  444.     Print #1,
  445.     Print #1,
  446.     Print #1,
  447.     Print #1,
  448.     Print #1,
  449.     Print #1,
  450.     Print #1,
  451.     If FileName$ <> "CON" Then Print #1, "                                     Page 6 "
  452.     Print #1, "    ■ Create Documentation switch:"
  453.     Print #1,
  454.     Print #1, "      /D[:n]  - Creates this documentation file."
  455.  
  456. If FileName$ <> "CON" Then Print ".";
  457.  
  458.     Print #1,
  459.     Print #1, "        Use this switch to create this documentation file at any time."
  460.     Print #1, "        You may also specify the name of the file by following the switch"
  461.     Print #1, "        with a colon and then the name you want to give the file, otherwise"
  462.     Print #1, "        the file created will be named, DAYQUOTE.DOC."
  463.     Print #1,
  464.     Print #1, "        This switch can also be used to create printed documentation by"
  465.     Print #1, "        specifying a printer device as the file name, such as PRN or LPT1,"
  466.     Print #1, "        or it can be used to quickly browse the documentation by using"
  467.     Print #1, "        the 'CON' device, pressing the 'Pause' key to pause the scrolling."
  468.     Print #1,
  469.     Print #1, "        To accomplish the latter, enter:  DAYQUOTE /D:CON"
  470.     Print #1,
  471.     Print #1,
  472.     Print #1, "    ■ Beg switch:"
  473.  
  474. If FileName$ <> "CON" Then Print ".";
  475.  
  476.     Print #1,
  477.     Print #1, "      /$  - Begs you for money."
  478.     Print #1,
  479.     Print #1, "        Use this switch to get the address of Freeware Unlimited from"
  480.     Print #1, "        the command line so you can send me large amounts of cash, if"
  481.     Print #1, "        you feel generous."
  482.     Print #1,
  483.     Print #1,
  484.     Print #1,
  485.     Print #1,
  486.     Print #1,
  487.     Print #1,
  488.     Print #1,
  489.     Print #1,
  490.     Print #1,
  491.  
  492. If FileName$ <> "CON" Then Print ".";
  493.  
  494.     Print #1,
  495.     Print #1,
  496.     Print #1,
  497.     Print #1,
  498.     Print #1,
  499.     Print #1,
  500.     Print #1,
  501.     Print #1,
  502.     Print #1,
  503.     Print #1,
  504.     Print #1,
  505.     Print #1,
  506.     Print #1,
  507.     Print #1,
  508.     Print #1,
  509.  
  510. If FileName$ <> "CON" Then Print ".";
  511.  
  512.     Print #1,
  513.     Print #1,
  514.     Print #1,
  515.     Print #1,
  516.     Print #1,
  517.     Print #1,
  518.     Print #1,
  519.     Print #1,
  520.     Print #1,
  521.     Print #1,
  522.     Print #1,
  523.     Print #1,
  524.     Print #1,
  525.     If FileName$ <> "CON" Then Print #1, "                                     Page 7 "
  526.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  527.  
  528. If FileName$ <> "CON" Then Print ".";
  529.  
  530.     Print #1, "  ■ RESULT MESSAGES"
  531.     Print #1, "────────────────────────────────────────────────────────────────────────────"
  532.     Print #1,
  533.     Print #1, "    ■ Command-line errors:"
  534.     Print #1,
  535.     Print #1, "      » Quote file not specified."
  536.     Print #1,
  537.     Print #1, "          You have not specified a file name to look for quotes in."
  538.     Print #1, "          This is the only required parameter for the program to be"
  539.     Print #1, "          able to correctly display a quote."
  540.     Print #1,
  541.     Print #1, "          This message, as well as with any other command line errors,"
  542.     Print #1, "          will be followed by the message:  Type 'DAYQUOTE /?' for help."
  543.     Print #1,
  544.     Print #1,
  545.  
  546. If FileName$ <> "CON" Then Print ".";
  547.  
  548.     Print #1, "      » Quote file can not be a reserved device name"
  549.     Print #1,
  550.     Print #1, "          You have specified a quote file with the name of a reserved"
  551.     Print #1, "          device."
  552.     Print #1,
  553.     Print #1, "          Reserved devices are CON, AUX, PRN, CLOCK$, COM1, COM2, COM3,"
  554.     Print #1, "          COM4, LPT1, LPT2, and LPT3."
  555.     Print #1,
  556.     Print #1, "          This result message will also show the device you specified."
  557.     Print #1,
  558.     Print #1,
  559.     Print #1, "      » Invalid switch"
  560.     Print #1,
  561.     Print #1, "          You have entered an invalid switch on the command line.  Any"
  562.     Print #1, "          text on the command line that is preceded by the forward"
  563.  
  564. If FileName$ <> "CON" Then Print ".";
  565.  
  566.     Print #1, "          slash character (/), up to but not including the next slash"
  567.     Print #1, "          character or the next whitespace character, is considered"
  568.     Print #1, "          to be a switch."
  569.     Print #1,
  570.     Print #1, "          This result message will also show the incorrect switch used."
  571.     Print #1,
  572.     Print #1,
  573.     Print #1, "      » Missing colon in switch"
  574.     Print #1,
  575.     Print #1, "          You have specified a switch which requires a second parameter"
  576.     Print #1, "          in the form of (switch):(parameter), but you left out the"
  577.     Print #1, "          colon character immediately following the switch."
  578.     Print #1,
  579.     Print #1, "          This result message will also show the incorrect switch used."
  580.     Print #1,
  581.  
  582. If FileName$ <> "CON" Then Print ".";
  583.  
  584.     Print #1,
  585.     Print #1, "      » Invalid foreground specification"
  586.     Print #1,
  587.     Print #1, "      » Invalid background specification"
  588.     Print #1,
  589.     Print #1, "          You have specified an invalid display color.  See the section"
  590.     Print #1, "          containing Extended Option Descriptions for the complete list"
  591.     Print #1, "          of available colors and their abbreviations."
  592.     Print #1,
  593.     Print #1, "          These result messages will also show the color you specified."
  594.     Print #1,
  595.     Print #1, "          If not specified, the foreground color will be white, and the"
  596.     Print #1, "          background color will be black."
  597.     Print #1,
  598.     Print #1,
  599.  
  600. If FileName$ <> "CON" Then Print ".";
  601.  
  602.     If FileName$ <> "CON" Then Print #1, "                                     Page 8 "
  603.     Print #1, "      » Multiple text justifications are not allowed"
  604.     Print #1,
  605.     Print #1, "          You have included too many text justification switches on the"
  606.     Print #1, "          command line.  Only one of the switches, /L /R or /C, may be"
  607.     Print #1, "          used at a time."
  608.     Print #1,
  609.     Print #1, "          Using two or more on the command line generates an error to"
  610.     Print #1, "          avoid having the program ignore subsequent justification"
  611.     Print #1, "          switches after reading the first one - a technique which"
  612.     Print #1, "          can only lead to further confusion."
  613.     Print #1,
  614.     Print #1, "          Text will be left-justified if one of these switches is not used."
  615.     Print #1,
  616.     Print #1,
  617.  
  618. If FileName$ <> "CON" Then Print ".";
  619.  
  620.     Print #1, "      » Invalid starting column"
  621.     Print #1,
  622.     Print #1, "          You have specified an invalid starting column at which to"
  623.     Print #1, "          begin displaying each line of the quote.  Valid values for"
  624.     Print #1, "          this switch are in the range of 1 to 30, inclusive."
  625.     Print #1,
  626.     Print #1, "          This result message will also show the column you specified."
  627.     Print #1,
  628.     Print #1, "          The starting column will be 10 if this switch is not used."
  629.     Print #1,
  630.     Print #1,
  631.     Print #1, "      » Invalid ending column"
  632.     Print #1,
  633.     Print #1, "          You have specified an invalid ending column at which to stop"
  634.     Print #1, "          displaying each line of the quote.  Valid values for this"
  635.  
  636. If FileName$ <> "CON" Then Print ".";
  637.  
  638.     Print #1, "          switch are in the range of 50 to 80, inclusive."
  639.     Print #1,
  640.     Print #1, "          This result message will also show the column you specified."
  641.     Print #1,
  642.     Print #1, "          The ending column will be 70 if this switch is not used."
  643.     Print #1,
  644.     Print #1,
  645.     Print #1, "      » Invalid top line"
  646.     Print #1,
  647.     Print #1, "          You have specified an invalid top line at which to begin"
  648.     Print #1, "          displaying the quote.  Valid values for this switch are in"
  649.     Print #1, "          the range of 1 to 24, inclusive."
  650.     Print #1,
  651.     Print #1, "          This result message will also show the line you specified."
  652.     Print #1,
  653.  
  654. If FileName$ <> "CON" Then Print ".";
  655.  
  656.     Print #1, "          The top line will be the line number before execution,"
  657.     Print #1, "          plus 2, if this switch is not used."
  658.     Print #1,
  659.     Print #1,
  660.     Print #1,
  661.     Print #1,
  662.     Print #1,
  663.     Print #1,
  664.     Print #1,
  665.     Print #1,
  666.     Print #1,
  667.     Print #1,
  668.     Print #1,
  669.     Print #1,
  670.     Print #1,
  671.  
  672. If FileName$ <> "CON" Then Print ".";
  673.  
  674.     Print #1,
  675.     Print #1,
  676.     If FileName$ <> "CON" Then Print #1, "                                     Page 9 "
  677.     Print #1, "    ■ File errors:"
  678.     Print #1,
  679.     Print #1, "      » Bad file name:  (filename)"
  680.     Print #1,
  681.     Print #1, "          You specified an invalid file name as the quote file."
  682.     Print #1,
  683.     Print #1,
  684.     Print #1, "      » Drive not ready looking for quote file:  (filename)"
  685.     Print #1,
  686.     Print #1, "          You attempted to read a quote file on a drive that either had"
  687.     Print #1, "          no disk present, or which had it's door open."
  688.     Print #1,
  689.  
  690. If FileName$ <> "CON" Then Print ".";
  691.  
  692.     Print #1,
  693.     Print #1, "      » Unsupported disk format encountered looking for file:  (filename)"
  694.     Print #1,
  695.     Print #1, "          The disk you are attempting to read from is of an unrecognized"
  696.     Print #1, "          format, or may be unformatted altogether."
  697.     Print #1,
  698.     Print #1,
  699.     Print #1, "      » Path not found looking for quote file:  (filename)"
  700.     Print #1,
  701.     Print #1, "          You specified a path or a file name which could not be found."
  702.     Print #1,
  703.     Print #1,
  704.     Print #1, "      » Problem looking for quote file:  (filename)"
  705.     Print #1,
  706.     Print #1, "          The file name you specified does not exist."
  707.  
  708. If FileName$ <> "CON" Then Print ".";
  709.  
  710.     Print #1,
  711.     Print #1,
  712.     Print #1, "      » Attempt to read an empty file:  (filename)"
  713.     Print #1,
  714.     Print #1, "          You specified a file which was only a file name, containing no"
  715.     Print #1, "          information.  Type 'DIR (filename)' on the command line to"
  716.     Print #1, "          verify that the file is of zero length."
  717.     Print #1,
  718.     Print #1,
  719.     Print #1, "      » Attempt to read a binary file or non-text characters found in:"
  720.     Print #1, "        (filename)"
  721.     Print #1,
  722.     Print #1, "          You specified a file that contains characters not found in"
  723.     Print #1, "          text files.  The file is a binary file, or other non-ASCII"
  724.     Print #1, "          file, or it contains undisplayable control characters, such"
  725.  
  726. If FileName$ <> "CON" Then Print ".";
  727.  
  728.     Print #1, "          as vertical tabs or form feeds."
  729.     Print #1,
  730.     Print #1, "          This error will also report detailed information on the invalid"
  731.     Print #1, "          characters found, as well as their location in the file.  The"
  732.     Print #1, "          'reference block', as it will be called, will show the text"
  733.     Print #1, "          block which starts about 100 bytes before the encountered"
  734.     Print #1, "          binary character and which ends about 100 characters afterward."
  735.     Print #1,
  736.     Print #1,
  737.     Print #1, "      » No quotes found in file:  (filename)"
  738.     Print #1,
  739.     Print #1, "          The file name which was specified contains no text."
  740.     Print #1,
  741.     Print #1,
  742.     Print #1,
  743.  
  744. If FileName$ <> "CON" Then Print ".";
  745.  
  746.     Print #1,
  747.     Print #1,
  748.     Print #1,
  749.     Print #1,
  750.     If FileName$ <> "CON" Then Print #1, "                                     Page 10 "
  751.     Print #1, "      » File read error - Size of object in:  (filename)"
  752.     Print #1, "        (filename) is possibly not a quote file."
  753.     Print #1,
  754.     Print #1, "          The specified quote file contains a block of text that is larger"
  755.     Print #1, "          than the limit of 1670 characters.  This message might be the"
  756.     Print #1, "          result of specifying a binary file or other non-quote text file."
  757.     Print #1,
  758.     Print #1,
  759.     Print #1, "      » Overflow reading file:  (filename)"
  760.     Print #1, "        (filename) is too large."
  761.  
  762. If FileName$ <> "CON" Then Print ".";
  763.  
  764.     Print #1,
  765.     Print #1, "          You have likely specified a binary file or other non-quote file."
  766.     Print #1,
  767.     Print #1,
  768.     Print #1, "    ■ Documentation printing messages:"
  769.     Print #1,
  770.     Print #1, "      » Printing documentation to file:  (filename)"
  771.     Print #1,
  772.     Print #1, "          This message will display, followed by visibly incrementing dots,"
  773.     Print #1, "          until the documentation file is finished being created."
  774.     Print #1,
  775.     Print #1,
  776.     Print #1, "      » Bad file name:  (filename)"
  777.     Print #1,
  778.     Print #1, "          You specified an invalid file name as the output file."
  779.  
  780. If FileName$ <> "CON" Then Print ".";
  781.  
  782.     Print #1,
  783.     Print #1,
  784.     Print #1, "      » Drive not ready printing to file:  (filename)"
  785.     Print #1,
  786.     Print #1, "          The drive you attempted to print the file to was a drive which"
  787.     Print #1, "          had no disk present, or which had it's door open."
  788.     Print #1,
  789.     Print #1,
  790.     Print #1, "      » Unsupported disk format encountered printing to file:  (filename)"
  791.     Print #1,
  792.     Print #1, "          The disk you are attempting to print to is of an unrecognized"
  793.     Print #1, "          format, or may be unformatted altogether.  The disk has no"
  794.     Print #1, "          file structures present within which to store the file."
  795.     Print #1,
  796.     Print #1,
  797.  
  798. If FileName$ <> "CON" Then Print ".";
  799.  
  800.     Print #1, "      » Path not found printing to file:  (filename)"
  801.     Print #1,
  802.     Print #1, "          You specified a path which could not be found in which to create"
  803.     Print #1, "          the requested file."
  804.     Print #1,
  805.     Print #1,
  806.     Print #1, "      » Printer is not responding at attempt to print file."
  807.     Print #1,
  808.     Print #1, "      » (devicename) is not responding at attempt to print file."
  809.     Print #1,
  810.     Print #1, "      » Device fault error printing to file:  (devicename)"
  811.     Print #1,
  812.     Print #1, "          You have used a device name which is not responding to the"
  813.     Print #1, "          data being transmitted.  If 'PRN', then check to see that"
  814.     Print #1, "          it is online, and that it is connected properly."
  815.  
  816. If FileName$ <> "CON" Then Print ".";
  817.  
  818.     Print #1,
  819.     Print #1,
  820.     Print #1,
  821.     Print #1,
  822.     Print #1,
  823.     Print #1,
  824.     If FileName$ <> "CON" Then Print #1, "                                     Page 11 "
  825.     Print #1, "    ■ Miscellaneous messages:"
  826.     Print #1,
  827.     Print #1, "      » Quote text is too long to fit in the specified frame."
  828.     Print #1,
  829.     Print #1, "          The text of the quote, after formatting it for the screen, will"
  830.     Print #1, "          exceed the screen height boundary, hence it can not be used."
  831.     Print #1,
  832.     Print #1, "          You can try adjusting the starting and ending columns if you"
  833.  
  834. If FileName$ <> "CON" Then Print ".";
  835.  
  836.     Print #1, "          get this message, but since the choice of quote from the file"
  837.     Print #1, "          is a random choice, there is no guarantee that the program"
  838.     Print #1, "          will attempt to display the same quote.  If you have very long"
  839.     Print #1, "          quotes in your quote file, you should probably not specify"
  840.     Print #1, "          starting and ending columns with the /S: and /E: switches unless"
  841.     Print #1, "          you use them make the region width wider than the default of"
  842.     Print #1, "          61 columns."
  843.     Print #1,
  844.     Print #1, "          You can also try narrowing down the maximum quote width by"
  845.     Print #1, "          creating a file containing only the longest quote, then, using"
  846.     Print #1, "          that file as the quote file, trying different starting and ending"
  847.     Print #1, "          columns until you no longer get this result message."
  848.     Print #1,
  849.     Print #1,
  850.     Print #1, "      » System error number #(nn) handling quote file:  (filename)"
  851.  
  852. If FileName$ <> "CON" Then Print ".";
  853.  
  854.     Print #1, "          - (relevant error message) -"
  855.     Print #1,
  856.     Print #1, "      » System error number #(nn) printing to file:  (filename)"
  857.     Print #1, "        - (relevant error message) -"
  858.     Print #1,
  859.     Print #1, "      » System error number #(nn) displaying quote from file:  (filename)"
  860.     Print #1, "        - (relevant error message) -"
  861.     Print #1,
  862.     Print #1, "          An unforeseen error has occurred in the specified routine. The"
  863.     Print #1, "          number, 'nn' is the equivalent BASIC error number, and the"
  864.     Print #1, "          message is the known cause of it."
  865.     Print #1,
  866.     Print #1,
  867.     Print #1,
  868.     Print #1,
  869.  
  870. If FileName$ <> "CON" Then Print ".";
  871.  
  872.     Print #1,
  873.     Print #1,
  874.     Print #1,
  875.     Print #1,
  876.     Print #1,
  877.     Print #1,
  878.     Print #1,
  879.     Print #1,
  880.     Print #1,
  881.     Print #1,
  882.     Print #1,
  883.     Print #1,
  884.     Print #1,
  885.     Print #1,
  886.     Print #1,
  887.  
  888. If FileName$ <> "CON" Then Print ".";
  889.  
  890.     Print #1,
  891.     Print #1,
  892.     Print #1,
  893.     Print #1,
  894.     Print #1,
  895.     Print #1,
  896.     Print #1,
  897.     Print #1,
  898.     If FileName$ <> "CON" Then Print #1, "                                     Page 12 "; Chr$(26);
  899.  
  900. If FileName$ <> "CON" Then Print " Done."
  901.  
  902.     Close #1
  903.  
  904.     SYSTEM
  905.  
  906. End Sub
  907.  
  908.